import 'package:color_dart/RgbaColor.dart';
import 'package:flutter/material.dart';
import 'package:im_flutter_sdk_example/components/labels/index.dart';
import 'package:im_flutter_sdk_example/jsonserialize/company/data.dart';

class CompanyHeader extends StatelessWidget {
  final CompanyInfo item;
  const CompanyHeader({Key key, this.item}) : super(key: key);
  @override
  Widget build(BuildContext context) {
    return Container(
      height: 140,
      padding: EdgeInsets.fromLTRB(16, 21, 16, 0),
      decoration: BoxDecoration(
          color: Colors.white,
          border: Border(
              // 四个值 top right bottom left
              top: BorderSide(
                  // 设置单侧边框的样式
                  color: rgba(245, 245, 245, 1),
                  width: 1,
                  style: BorderStyle.solid))),
      child: Row(
        mainAxisAlignment: MainAxisAlignment.start,
        crossAxisAlignment: CrossAxisAlignment.start,
        children: [
          SizedBox(
            width: 90,
            child: Container(
              padding: EdgeInsets.only(right: 29),
              child: Column(
                  crossAxisAlignment: CrossAxisAlignment.center,
                  children: [
                    SizedBox(
                      width: 62,
                      height: 62,
                      child: ClipOval(
                        child: Image.network(
                          '${item.logo}',
                          fit: BoxFit.contain,
                          width: 62,
                          height: 62,
                        ),
                      ),
                    ),
                  ]),
            ),
          ),
          Expanded(
            child:
                Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
              Container(
                padding: EdgeInsets.only(bottom: 10),
                child: Row(
                  crossAxisAlignment: CrossAxisAlignment.baseline,
                  children: [
                    Expanded(
                      child: Text('${item.baseName}',
                          maxLines: 2,
                          overflow: TextOverflow.ellipsis,
                          style: TextStyle(
                              color: rgba(68, 68, 68, 1),
                              fontSize: 27,
                              fontWeight: FontWeight.w600)),
                    ),
                  ],
                ),
              ),
              LabelExpertDetail(name: '${item.industryTag}'),
            ]),
          ),
        ],
      ),
    );
  }
}
